package com.hp.service.strategy.impl;

import com.hp.service.strategy.Strategy;
import org.springframework.stereotype.Component;

import jakarta.annotation.PostConstruct;

import static com.hp.service.strategy.ContextFacade.SERVICE_HASH_MAP;


/**
 * @author hp
 */
@Component
public class OperationAdd implements Strategy {
    @Override
    public int doOperation(int num1, int num2) {
        return num1 + num2;
    }

    @PostConstruct
    public void init() {
        SERVICE_HASH_MAP.put("add", this);
    }
}
